libxc foreign address translation bug
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 2 May 2008 12:46:16 +0000 (13:46 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 2 May 2008 12:46:16 +0000 (13:46 +0100)
In the xc_translate_foreign_address function from libxc, there is a
check on the page directory entry to see if the page is 4K or 4M.
However, the check is looking at bit 3, when it should be looking at
bit 7.  This patch fixes the problem.

Signed-off-by: Bryan D. Payne <bryan@thepaynes.cc>
tools/libxc/xc_pagetab.c

index e67a34ae8f42dadb128810e62408edc34a00d980..4682bb7f0428f6143dba9130fb90387c76574382 100644 (file)
@@ -141,7 +141,7 @@ unsigned long xc_translate_foreign_address(int xc_handle, uint32_t dom,
 
     /* Page Table */
 
-    if (pde & 0x00000008) { /* 4M page (or 2M in PAE mode) */
+    if (pde & 0x00000080) { /* 4M page (or 2M in PAE mode) */
         DPRINTF("Cannot currently cope with 2/4M pages\n");
         exit(-1);
     } else { /* 4k page */